package cn.bs.busuo.content.dao.persist.repository.impl;

import cn.bs.busuo.content.dao.persist.mapper.CommentMapper;
import cn.bs.busuo.content.dao.persist.repository.CommentRepository;
import cn.bs.busuo.content.pojo.vo.CommentHotelByCheckVO;
import cn.bs.busuo.content.pojo.vo.CommentSightByCheckVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author: Feng
 * @since: 2023/12/9
 */
@Repository
public class CommentRepositoryImpl implements CommentRepository {

    @Autowired
    private CommentMapper commentMapper;

    //-------------酒店部分

    //查看未审核的酒店文章评论
    @Override
    public List<CommentHotelByCheckVO> listHotelNotCheck() {
        return commentMapper.listHotelNotCheck();
    }

    //审核酒店文章评论通过
    @Override
    public int hotelCommentCheck(List<Long> ids) {
       return commentMapper.hotelCommentCheck(ids);
    }

    //审核酒店文章评论不通过
    @Override
    public int hotelCommentNotCheck(List<Long> ids) {
        return commentMapper.hotelCommentNotCheck(ids);
    }


    //-------------景点部分

    //查看未审核的景点文章评论
    @Override
    public List<CommentSightByCheckVO> listSightNotCheck() {
        return commentMapper.listSightNotCheck();
    }

    //审核景点文章评论通过
    @Override
    public int sightCommentCheck(List<Long> ids) {
        return commentMapper.sightCommentCheck(ids);
    }

    //审核景点文章评论不通过
    @Override
    public int sightCommentNotCheck(List<Long> ids) {
        return commentMapper.sightCommentNotCheck(ids);
    }
}
